<?php
/**
 * ListSponsoredBrandsCampaignsBetaRequestContent
 *
 * PHP version 5
 *
 * @category Class
 * @package  AmazonAdvertisingApi
 * @author   vv_guo
 * @link    https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 */

/**
 * Sponsored Brands campaign management
 *
 * Create and manage Sponsored Brands campaigns.   To learn more about Sponsored Brands campaigns, see:   - [Sponsored Brands overview](guides/sponsored-brands/overview)  - [Sponsored Brands campaign structure](guides/sponsored-brands/campaigns/structure)  - [Get started with Sponsored Brands campaigns](guides/sponsored-brands/campaigns/get-started-with-campaigns)
 *
 * OpenAPI spec version: 4.0
 * 
 * Generated by:https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api.git
 * AmazonAdvertisingApi Codegen version: 3.0.51
 */
/**
 * NOTE: This class is auto generated by the AmazonAdvertisingApi code generator program.
 *https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 * Do not edit the class manually.
 */

namespace AmazonAdvertisingApi\Model;

use \ArrayAccess;
use \AmazonAdvertisingApi\ObjectSerializer;

/**
 * ListSponsoredBrandsCampaignsBetaRequestContent Class Doc Comment
 *
 * @category Class
 * @package  AmazonAdvertisingApi
 * @author   vv_guo
 * @link    https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 */
class ListSponsoredBrandsCampaignsBetaRequestContent implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $AmazonAdvertisingApiModelName = 'ListSponsoredBrandsCampaignsBetaRequestContent';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $AmazonAdvertisingApiTypes = [
        'campaign_id_filter' => '\AmazonAdvertisingApi\Model\ObjectIdFilter',
        'portfolio_id_filter' => '\AmazonAdvertisingApi\Model\ObjectIdFilter',
        'state_filter' => '\AmazonAdvertisingApi\Model\EntityStateFilter',
        'max_results' => 'float',
        'next_token' => 'string',
        'goal_type_filter' => '\AmazonAdvertisingApi\Model\GoalTypeFilter',
        'include_extended_data_fields' => 'bool',
        'name_filter' => '\AmazonAdvertisingApi\Model\NameFilter'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $AmazonAdvertisingApiFormats = [
        'campaign_id_filter' => null,
        'portfolio_id_filter' => null,
        'state_filter' => null,
        'max_results' => null,
        'next_token' => null,
        'goal_type_filter' => null,
        'include_extended_data_fields' => null,
        'name_filter' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function AmazonAdvertisingApiTypes()
    {
        return self::$AmazonAdvertisingApiTypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function AmazonAdvertisingApiFormats()
    {
        return self::$AmazonAdvertisingApiFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'campaign_id_filter' => 'campaignIdFilter',
        'portfolio_id_filter' => 'portfolioIdFilter',
        'state_filter' => 'stateFilter',
        'max_results' => 'maxResults',
        'next_token' => 'nextToken',
        'goal_type_filter' => 'goalTypeFilter',
        'include_extended_data_fields' => 'includeExtendedDataFields',
        'name_filter' => 'nameFilter'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'campaign_id_filter' => 'setCampaignIdFilter',
        'portfolio_id_filter' => 'setPortfolioIdFilter',
        'state_filter' => 'setStateFilter',
        'max_results' => 'setMaxResults',
        'next_token' => 'setNextToken',
        'goal_type_filter' => 'setGoalTypeFilter',
        'include_extended_data_fields' => 'setIncludeExtendedDataFields',
        'name_filter' => 'setNameFilter'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'campaign_id_filter' => 'getCampaignIdFilter',
        'portfolio_id_filter' => 'getPortfolioIdFilter',
        'state_filter' => 'getStateFilter',
        'max_results' => 'getMaxResults',
        'next_token' => 'getNextToken',
        'goal_type_filter' => 'getGoalTypeFilter',
        'include_extended_data_fields' => 'getIncludeExtendedDataFields',
        'name_filter' => 'getNameFilter'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$AmazonAdvertisingApiModelName;
    }



    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['campaign_id_filter'] = isset($data['campaign_id_filter']) ? $data['campaign_id_filter'] : null;
        $this->container['portfolio_id_filter'] = isset($data['portfolio_id_filter']) ? $data['portfolio_id_filter'] : null;
        $this->container['state_filter'] = isset($data['state_filter']) ? $data['state_filter'] : null;
        $this->container['max_results'] = isset($data['max_results']) ? $data['max_results'] : null;
        $this->container['next_token'] = isset($data['next_token']) ? $data['next_token'] : null;
        $this->container['goal_type_filter'] = isset($data['goal_type_filter']) ? $data['goal_type_filter'] : null;
        $this->container['include_extended_data_fields'] = isset($data['include_extended_data_fields']) ? $data['include_extended_data_fields'] : null;
        $this->container['name_filter'] = isset($data['name_filter']) ? $data['name_filter'] : null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets campaign_id_filter
     *
     * @return \AmazonAdvertisingApi\Model\ObjectIdFilter
     */
    public function getCampaignIdFilter()
    {
        return $this->container['campaign_id_filter'];
    }

    /**
     * Sets campaign_id_filter
     *
     * @param \AmazonAdvertisingApi\Model\ObjectIdFilter $campaign_id_filter campaign_id_filter
     *
     * @return $this
     */
    public function setCampaignIdFilter($campaign_id_filter)
    {
        $this->container['campaign_id_filter'] = $campaign_id_filter;

        return $this;
    }

    /**
     * Gets portfolio_id_filter
     *
     * @return \AmazonAdvertisingApi\Model\ObjectIdFilter
     */
    public function getPortfolioIdFilter()
    {
        return $this->container['portfolio_id_filter'];
    }

    /**
     * Sets portfolio_id_filter
     *
     * @param \AmazonAdvertisingApi\Model\ObjectIdFilter $portfolio_id_filter portfolio_id_filter
     *
     * @return $this
     */
    public function setPortfolioIdFilter($portfolio_id_filter)
    {
        $this->container['portfolio_id_filter'] = $portfolio_id_filter;

        return $this;
    }

    /**
     * Gets state_filter
     *
     * @return \AmazonAdvertisingApi\Model\EntityStateFilter
     */
    public function getStateFilter()
    {
        return $this->container['state_filter'];
    }

    /**
     * Sets state_filter
     *
     * @param \AmazonAdvertisingApi\Model\EntityStateFilter $state_filter state_filter
     *
     * @return $this
     */
    public function setStateFilter($state_filter)
    {
        $this->container['state_filter'] = $state_filter;

        return $this;
    }

    /**
     * Gets max_results
     *
     * @return float
     */
    public function getMaxResults()
    {
        return $this->container['max_results'];
    }

    /**
     * Sets max_results
     *
     * @param float $max_results Number of records to include in the paginated response. Defaults to max page size for given API.
     *
     * @return $this
     */
    public function setMaxResults($max_results)
    {
        $this->container['max_results'] = $max_results;

        return $this;
    }

    /**
     * Gets next_token
     *
     * @return string
     */
    public function getNextToken()
    {
        return $this->container['next_token'];
    }

    /**
     * Sets next_token
     *
     * @param string $next_token Token value allowing to navigate to the next response page.
     *
     * @return $this
     */
    public function setNextToken($next_token)
    {
        $this->container['next_token'] = $next_token;

        return $this;
    }

    /**
     * Gets goal_type_filter
     *
     * @return \AmazonAdvertisingApi\Model\GoalTypeFilter
     */
    public function getGoalTypeFilter()
    {
        return $this->container['goal_type_filter'];
    }

    /**
     * Sets goal_type_filter
     *
     * @param \AmazonAdvertisingApi\Model\GoalTypeFilter $goal_type_filter goal_type_filter
     *
     * @return $this
     */
    public function setGoalTypeFilter($goal_type_filter)
    {
        $this->container['goal_type_filter'] = $goal_type_filter;

        return $this;
    }

    /**
     * Gets include_extended_data_fields
     *
     * @return bool
     */
    public function getIncludeExtendedDataFields()
    {
        return $this->container['include_extended_data_fields'];
    }

    /**
     * Sets include_extended_data_fields
     *
     * @param bool $include_extended_data_fields Setting to true will slow down performance because the API needs to retrieve extra information for each campaign.
     *
     * @return $this
     */
    public function setIncludeExtendedDataFields($include_extended_data_fields)
    {
        $this->container['include_extended_data_fields'] = $include_extended_data_fields;

        return $this;
    }

    /**
     * Gets name_filter
     *
     * @return \AmazonAdvertisingApi\Model\NameFilter
     */
    public function getNameFilter()
    {
        return $this->container['name_filter'];
    }

    /**
     * Sets name_filter
     *
     * @param \AmazonAdvertisingApi\Model\NameFilter $name_filter name_filter
     *
     * @return $this
     */
    public function setNameFilter($name_filter)
    {
        $this->container['name_filter'] = $name_filter;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }

    /**
     * Sets value based on offset.
     *
     * @param integer $offset Offset
     * @param mixed   $value  Value to be set
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(
                ObjectSerializer::sanitizeForSerialization($this),
                JSON_PRETTY_PRINT
            );
        }

        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}
